package controller.remote;

import com.zuche.framework.remote.RemoteClient;
import com.zuche.framework.remote.RemoteClientFactory;
import com.zuche.framework.remote.RemoteType;

/**
 * description元服务调用工具类
 * All Rights Reserved.
 * Created by 雷霆 on 2016/2/26.
 */
public class RemoteClientUtils {

	private static  final  String LOCAL_HOST="http://localhost:9080/cartp";
	private static  final  String yuxinxin="http://10.100.18.172:8080/cartp";
	private static  final  String CARTP_TEST_3="http://paytest03.10101111.com:9080/cartp";
	private static  final  String CARTP_TEST_2="http://paytest02.10101111.com:9080/cartp";
	private static  final  String CARTP_TEST_1="http://paytest.10101111.com:9080/cartp";
	private static  final  String CARTP_PRE="http://paypre.10101111.com/cartp";
	private static  final  String CARTP__ZUCHE_PROD="http://pay.zuche.com/cartp";
	private static  final  String CARTP__ZUCHE_TEST1="http://paytest.zuche.com:9080/cartp";
	private static  final  String CARTP_PROD="http://10.200.2.37/cartp";
	private static  final  String CARTP_TEST_FCAR_2="http://fcartptest02.10101111.com:9080/cartp";
	private static  final  String CARTP_TEST_FCAR_1="http://fcartptest.10101111.com:9080/cartp";
	private static  final  String CARTP_TEST_ZUCHE_1="http://paytest.zuche.com/cartp";
	private static  final  String CARTP_TEST_ZUCHE_3="http://paytest03.zuche.com/cartp";
	/**
	 * Description: 获取远程服务类型为TCP的client
	 * @return
	 */
	public static RemoteClient getTCPClient(){
		
		return RemoteClientFactory.getInstance(RemoteType.TCP);
	}


	/**
	 * Description: 获取远程服务类型为HESSIAN的client
	 * @return
	 */
	public static RemoteClient getHESSIANClient(){

		return RemoteClientFactory.getInstance(RemoteType.HESSIAN);
	}

	/**
	 * 远程服务调用时默认的通信方式，当前为HESSIAN 后期将改为TCP
	 * 建议使用该方法，后期更改时便于维护。
	 * @return
	 */
	public static RemoteClient getDefaultClient(){

		return RemoteClientFactory.getInstance(RemoteType.HESSIAN);
	}

	/**
	 * 远程服务调用时默认的通信方式，当前为HESSIAN 后期将改为TCP
	 * 建议使用该方法，后期更改时便于维护。
	 * @return
	 */
	public static RemoteClient getTestClient(){

		return RemoteClientFactory.getInstance("http://fcarrepaytest.10101111.com/fcarrepay", RemoteType.HESSIAN);
	}

	/**
	 * 远程服务调用时默认的通信方式，当前为HESSIAN 后期将改为TCP
	 * 建议使用该方法，后期更改时便于维护。
	 * @return
	 */
	public static RemoteClient getCarTpTestClient(){

		return RemoteClientFactory.getInstance(CARTP_PRE, RemoteType.HESSIAN);
	}
}
